package ${servicePackage}

import ${entityPackage}.${entityName}

/**
* ${tableComment}(table: ${tableName}) 接口
* @author ${author}
* @since ${date}
*/
interface ${serviceName}{

    /**
     * 插入新数据
     * @author ${author}
     * @since ${date}
     * @param entity:
     * @return com.test.entity.UserEntity
    */
    fun insert(entity: ${entityName}):${entityName}

<#if primaryColumn?? && (primaryColumn?size == 1)>
    /**
     * 根据ID删除记录
     * @author ${author}
     * @since ${date}
     * @param id:
    */
    fun deleteById(id: Any)

    /**
     * 根据ID更新记录
     * @author ${author}
     * @since ${date}
     * @param param:
    */
    fun updateById(param: ${entityName})

    /**
     * 根据ID选择性更新
     * @author ${author}
     * @since ${date}
     * @param param:
    */
    fun updateSelectiveById(param: ${entityName})

    /**
     * 根据ID查询记录
     * @author ${author}
     * @since ${date}
     * @param id:
     * @return ${entityPackage}.${entityName}
    */
    fun selectById(id: Any): ${entityName}?

</#if>

}
